<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
		<table class="table table-hover">
			<tr></tr>
			<tr class="active">
			  <th width="80">ID</th>

			  <?php foreach ($typeattrdata as $v){?>
			  <th><?php echo $v['taname']?></th>
			  <?php }?>
			  <th width="70">库存</th>
			  <th width="90">货号</th>
			  <th width="250">操作</th>
			</tr>
			<?php foreach ($goodslistdata as $v){?>
			<tr>
				<td><?php echo $v['glid']?></td>
				<?php $glattrid =  explode(',',$v['glattrid']) ?>
				<?php foreach ($glattrid as $v1){?>	
				<td><?php echo $v1?></td>
				<?php }?>
				<td><?php echo $v['glinv']?></td>
				<td><?php echo $v['glnum']?></td>
				<td>
					<a href="<?php echo U('edit',array('glid'=>$v['glid']))?>" class="btn btn-xs btn-primary">编辑</a>
					<a href="<?php echo U('down',array('glid'=>$v['glid']))?>" class="btn btn-xs btn-warning">删除</a>
				</td>
			</tr>
			<?php }?>
			<!--添加-->
			<form action="" method="post">
				<input type="hidden" name="goods_gid" value="<?php echo $goodsattrdata[0]['goods_gid']?>"/>
				<tr class="active">
				  <td width="80">添加</td>
				  <?php foreach ($goodsattrdata as $v){?>
						<td>
							<select name="glattrid[]">
								<?php $gavalue = explode(',',$v['gavalue']) ?>
								<?php foreach ($gavalue as $v1){?>
									<option value="<?php echo $v1?>"><?php echo $v1?></option>
								<?php }?>
							</select>
						</td>
				  <?php }?><?php echo p($typeattrdata);p($goodslistdata);p($goodsattrdata)?>
				  <td width="70"><input style="width: 70px;" type="text" name="glinv" id="" /></td>
				  <td width="90"><input style="width: 90px;" type="text" name="glnum" id="" /></td>
				  <td width="250">
				  	
				  	<button class="btn btn-xs btn-primary " type="submit"> 确认添加 </button>
				  </td>
				</tr>
			</form>
		</table>
		
		
		
		
		
		
		
	</body>
</html>
